<%@ page import="com.news.db.OpDB" %>
<%@ page import="com.news.model.Person" %>
<%@ page import="java.util.ArrayList" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
  <head>
    <title>前台左侧栏</title>
  </head>
  <body>
    <table border="0" width="200" height="10">
      <tr>
        <td></td>
      </tr>
    </table>
    <form action="indexServlet?method=vote" method="post">
      <table border="1" width="200" height="120" cellspacing="0" cellpadding="0" rules="rows">
        <tr>
          <td align="center" colspan="3">
            <font style="font-family: 黑体;font-size: 15px">请为您喜欢的人物投票</font>
          </td>
        </tr>

        <tr>
          <%
            OpDB opdb1 = new OpDB();
            ArrayList<Person> list1 = opdb1.OpGetPerson();
            if (list1 != null && list1.size() > 0){
              for (int i = 0; i < list1.size(); i++) {
                Person p = list1.get(i);
          %>
                <td>
                  <input type="radio" name="person_name" value="<%=p.getId()%>">
                  <a href="indexServlet?method=person&strid=<%=p.getId()%>" style="font-size: 10px"><%=p.getPeople_name()%></a>
                </td>
          <%
              }
            }
          %>
        </tr>
        <tr>
          <td align="center" colspan="3"><input type="submit" value="投票"></td>
        </tr>
      </table>
  </form>


    <table border="1" width="200" height="350" cellspacing="0" cellpadding="0" rules="rows">
      <tr>
        <td align="center"><font style="font-family: 黑体;font-size: 15px;">友&nbsp;情&nbsp;链&nbsp;接</font></td>
      </tr>
      <tr>
        <td align="center">
          <font style="font-size: 14px;">
            <a href="indexServlet?method=link&id=1">腾讯新闻</a>
          </font>
        </td>
      </tr>
      <tr>
        <td align="center">
          <font style="font-size: 14px;">
            <a href="indexServlet?method=link&id=2">百度新闻</a>
          </font>
        </td>
      </tr>
      <tr>
        <td align="center">
          <font style="font-size: 14px;">
            <a href="indexServlet?method=link&id=3">凤凰新闻</a>
          </font>
        </td>
      </tr>
      <tr>
        <td align="center">
          <font style="font-size: 14px;">
            <a href="indexServlet?method=link&id=4">新浪新闻</a>
          </font>
        </td>
      </tr>
    </table>
  </body>
</html>